3.11.99 \(\int \frac {(A+B x) (a+b x+c x^2)^p}{x} \, dx\) [1099]

3.11.99.1 Optimal result
3.11.99.2 Mathematica [A] (verified)
3.11.99.3 Rubi [A] (verified)
3.11.99.4 Maple [F]
3.11.99.5 Fricas [F]
3.11.99.6 Sympy [F]
3.11.99.7 Maxima [F]
3.11.99.8 Giac [F]
3.11.99.9 Mupad [F(-1)]

3.11.99.1 Optimal result

Integrand size = 21, antiderivative size = 273 \[ \int \frac {(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx=\frac {2^{-1+2 p} A \left (\frac {b-\sqrt {b^2-4 a c}+2 c x}{c x}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{c x}\right )^{-p} \left (a+b x+c x^2\right )^p \operatorname {AppellF1}\left (-2 p,-p,-p,1-2 p,-\frac {b-\sqrt {b^2-4 a c}}{2 c x},-\frac {b+\sqrt {b^2-4 a c}}{2 c x}\right )}{p}-\frac {2^{1+p} B \left (-\frac {b-\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}\right )^{-1-p} \left (a+b x+c x^2\right )^{1+p} \operatorname {Hypergeometric2F1}\left (-p,1+p,2+p,\frac {b+\sqrt {b^2-4 a c}+2 c x}{2 \sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} (1+p)} \]

output
-2^(p+1)*B*(c*x^2+b*x+a)^(p+1)*hypergeom([-p, p+1],[2+p],1/2*(b+2*c*x+(-4* 
a*c+b^2)^(1/2))/(-4*a*c+b^2)^(1/2))*((-b-2*c*x+(-4*a*c+b^2)^(1/2))/(-4*a*c 
+b^2)^(1/2))^(-1-p)/(p+1)/(-4*a*c+b^2)^(1/2)+2^(-1+2*p)*A*(c*x^2+b*x+a)^p* 
AppellF1(-2*p,-p,-p,1-2*p,1/2*(-b-(-4*a*c+b^2)^(1/2))/c/x,1/2*(-b+(-4*a*c+ 
b^2)^(1/2))/c/x)/p/(((b+2*c*x-(-4*a*c+b^2)^(1/2))/c/x)^p)/(((b+2*c*x+(-4*a 
*c+b^2)^(1/2))/c/x)^p)
 
3.11.99.2 Mathematica [A] (verified)

Time = 0.44 (sec) , antiderivative size = 263, normalized size of antiderivative = 0.96 \[ \int \frac {(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx=\frac {1}{2} (a+x (b+c x))^p \left (\frac {4^p A \left (\frac {b-\sqrt {b^2-4 a c}+2 c x}{c x}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{c x}\right )^{-p} \operatorname {AppellF1}\left (-2 p,-p,-p,1-2 p,-\frac {b+\sqrt {b^2-4 a c}}{2 c x},\frac {-b+\sqrt {b^2-4 a c}}{2 c x}\right )}{p}+\frac {2^p B \left (b-\sqrt {b^2-4 a c}+2 c x\right ) \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p} \operatorname {Hypergeometric2F1}\left (-p,1+p,2+p,\frac {-b+\sqrt {b^2-4 a c}-2 c x}{2 \sqrt {b^2-4 a c}}\right )}{c (1+p)}\right ) \]

input
Integrate[((A + B*x)*(a + b*x + c*x^2)^p)/x,x]
 
output
((a + x*(b + c*x))^p*((4^p*A*AppellF1[-2*p, -p, -p, 1 - 2*p, -1/2*(b + Sqr 
t[b^2 - 4*a*c])/(c*x), (-b + Sqrt[b^2 - 4*a*c])/(2*c*x)])/(p*((b - Sqrt[b^ 
2 - 4*a*c] + 2*c*x)/(c*x))^p*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(c*x))^p) + 
(2^p*B*(b - Sqrt[b^2 - 4*a*c] + 2*c*x)*Hypergeometric2F1[-p, 1 + p, 2 + p, 
 (-b + Sqrt[b^2 - 4*a*c] - 2*c*x)/(2*Sqrt[b^2 - 4*a*c])])/(c*(1 + p)*((b + 
 Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])^p)))/2
 
3.11.99.3 Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 273, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {1269, 1096, 1178, 150}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx\)

\(\Big \downarrow \) 1269

\(\displaystyle A \int \frac {\left (c x^2+b x+a\right )^p}{x}dx+B \int \left (c x^2+b x+a\right )^pdx\)

\(\Big \downarrow \) 1096

\(\displaystyle A \int \frac {\left (c x^2+b x+a\right )^p}{x}dx-\frac {B 2^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \left (a+b x+c x^2\right )^{p+1} \operatorname {Hypergeometric2F1}\left (-p,p+1,p+2,\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{(p+1) \sqrt {b^2-4 a c}}\)

\(\Big \downarrow \) 1178

\(\displaystyle -A 4^p \left (\frac {1}{x}\right )^{2 p} \left (\frac {-\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (\frac {\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (a+b x+c x^2\right )^p \int \left (\frac {b-\sqrt {b^2-4 a c}}{2 c x}+1\right )^p \left (\frac {b+\sqrt {b^2-4 a c}}{2 c x}+1\right )^p \left (\frac {1}{x}\right )^{-2 p-1}d\frac {1}{x}-\frac {B 2^{p+1} \left (a+b x+c x^2\right )^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \operatorname {Hypergeometric2F1}\left (-p,p+1,p+2,\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{(p+1) \sqrt {b^2-4 a c}}\)

\(\Big \downarrow \) 150

\(\displaystyle \frac {A 2^{2 p-1} \left (\frac {-\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (\frac {\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (a+b x+c x^2\right )^p \operatorname {AppellF1}\left (-2 p,-p,-p,1-2 p,-\frac {b-\sqrt {b^2-4 a c}}{2 c x},-\frac {b+\sqrt {b^2-4 a c}}{2 c x}\right )}{p}-\frac {B 2^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \left (a+b x+c x^2\right )^{p+1} \operatorname {Hypergeometric2F1}\left (-p,p+1,p+2,\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{(p+1) \sqrt {b^2-4 a c}}\)

input
Int[((A + B*x)*(a + b*x + c*x^2)^p)/x,x]
 
output
(2^(-1 + 2*p)*A*(a + b*x + c*x^2)^p*AppellF1[-2*p, -p, -p, 1 - 2*p, -1/2*( 
b - Sqrt[b^2 - 4*a*c])/(c*x), -1/2*(b + Sqrt[b^2 - 4*a*c])/(c*x)])/(p*((b 
- Sqrt[b^2 - 4*a*c] + 2*c*x)/(c*x))^p*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(c* 
x))^p) - (2^(1 + p)*B*(-((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c] 
))^(-1 - p)*(a + b*x + c*x^2)^(1 + p)*Hypergeometric2F1[-p, 1 + p, 2 + p, 
(b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(2*Sqrt[b^2 - 4*a*c])])/(Sqrt[b^2 - 4*a*c] 
*(1 + p))
 

3.11.99.3.1 Defintions of rubi rules used

rule 150
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ 
] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 
, (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] &&  !In 
tegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
 

rule 1096
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 
 - 4*a*c, 2]}, Simp[(-(a + b*x + c*x^2)^(p + 1)/(q*(p + 1)*((q - b - 2*c*x) 
/(2*q))^(p + 1)))*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/(2*q) 
], x]] /; FreeQ[{a, b, c, p}, x] &&  !IntegerQ[4*p] &&  !IntegerQ[3*p]
 

rule 1178
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S 
ymbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(-(1/(d + e*x))^(2*p))*((a + 
b*x + c*x^2)^p/(e*(e*((b - q + 2*c*x)/(2*c*(d + e*x))))^p*(e*((b + q + 2*c* 
x)/(2*c*(d + e*x))))^p))   Subst[Int[x^(-m - 2*(p + 1))*Simp[1 - (d - e*((b 
 - q)/(2*c)))*x, x]^p*Simp[1 - (d - e*((b + q)/(2*c)))*x, x]^p, x], x, 1/(d 
 + e*x)], x]] /; FreeQ[{a, b, c, d, e, p}, x] && ILtQ[m, 0]
 

rule 1269
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g/e   Int[(d + e*x)^(m + 1)*(a + b*x + 
 c*x^2)^p, x], x] + Simp[(e*f - d*g)/e   Int[(d + e*x)^m*(a + b*x + c*x^2)^ 
p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] &&  !IGtQ[m, 0]
 
3.11.99.4 Maple [F]

\[\int \frac {\left (B x +A \right ) \left (c \,x^{2}+b x +a \right )^{p}}{x}d x\]

input
int((B*x+A)*(c*x^2+b*x+a)^p/x,x)
 
output
int((B*x+A)*(c*x^2+b*x+a)^p/x,x)
 
3.11.99.5 Fricas [F]

\[ \int \frac {(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx=\int { \frac {{\left (B x + A\right )} {\left (c x^{2} + b x + a\right )}^{p}}{x} \,d x } \]

input
integrate((B*x+A)*(c*x^2+b*x+a)^p/x,x, algorithm="fricas")
 
output
integral((B*x + A)*(c*x^2 + b*x + a)^p/x, x)
 
3.11.99.6 Sympy [F]

\[ \int \frac {(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx=\int \frac {\left (A + B x\right ) \left (a + b x + c x^{2}\right )^{p}}{x}\, dx \]

input
integrate((B*x+A)*(c*x**2+b*x+a)**p/x,x)
 
output
Integral((A + B*x)*(a + b*x + c*x**2)**p/x, x)
 
3.11.99.7 Maxima [F]

\[ \int \frac {(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx=\int { \frac {{\left (B x + A\right )} {\left (c x^{2} + b x + a\right )}^{p}}{x} \,d x } \]

input
integrate((B*x+A)*(c*x^2+b*x+a)^p/x,x, algorithm="maxima")
 
output
integrate((B*x + A)*(c*x^2 + b*x + a)^p/x, x)
 
3.11.99.8 Giac [F]

\[ \int \frac {(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx=\int { \frac {{\left (B x + A\right )} {\left (c x^{2} + b x + a\right )}^{p}}{x} \,d x } \]

input
integrate((B*x+A)*(c*x^2+b*x+a)^p/x,x, algorithm="giac")
 
output
integrate((B*x + A)*(c*x^2 + b*x + a)^p/x, x)
 
3.11.99.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx=\int \frac {\left (A+B\,x\right )\,{\left (c\,x^2+b\,x+a\right )}^p}{x} \,d x \]

input
int(((A + B*x)*(a + b*x + c*x^2)^p)/x,x)
 
output
int(((A + B*x)*(a + b*x + c*x^2)^p)/x, x)